package Server;

import java.util.Random;

public class Rnd{
	private static Rnd _instance = null;
	public static Rnd getInstance(){
		if(_instance == null){
			_instance = new Rnd();
		}
		return _instance;
	}

	private Rnd(){
		_rnd = new Random();
	}

	private Random _rnd = null;

	public synchronized int rnd(int min, int max){
		return _rnd.nextInt((++max)-min)+min;
	}

	public Random getRnd(){
		return _rnd;
	}
}
